GUI Help > Fonts > createFont

createFont
handle font=createFont(str name, int size, bool bold, bool italic, bool underline)

Description:
Creates a new font and returns its handle. After creating the font, you can use applyFont to change the appearence of text in a gadget.

Return Value:
Handle to the new font.

Parameters:
name The name of the font, eg "Arial", "Times New Roman" or "Courier New". The font must be installed on the user's system, so it is wise to use well known fonts where possible.
size The size of the font. This is a point-size, the kind you might find in Microsoft Word for instance.
bold 1 if the font is bold, 0 otherwise.
italic 1 if the font is italic, 0 otherwise.
underline 1 if the font is to be underlined, 0 otherwise. Not all fonts support the underline option, although most do.
Remarks:


See Also:


Example:
(Note: You will need to include the GUI constants file for this example to work)